package com.cc.controller;

import com.cc.dto.ProductTypeDTO;
import com.cc.entity.ProductTypes;
import com.cc.service.ProductTypesService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.stream.Collectors;

@RestController
@RequestMapping("/api/product-types")
public class ProductTypeController {

    @Autowired
    private ProductTypesService productTypesService;

    @RequestMapping("/list")
    public List<ProductTypes> list() {
        return productTypesService.list();
    }
}